<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JQ实现ajax_get</title>

    <script src="js/jquery-3.3.1.min.js"></script>
    <script>
        function fun() {
           $.get("ajaxServlet",{username:"rose"},function (data) {
                alert(data);
           },"text");
        }
    </script>

</head>
<body>
    <input type="button" value="发送异步请求" onclick="fun();">
    <input>
</body>
</html>